function setProxy(proxyObjs) {
    proxyObjs.forEach(objName => {
        const handler = {
            get(target, property) {

                // console.log("[GET]", "对象:", objName, "属性名:", property, "属性类型:", Object.prototype.toString.call(property), "属性值:", target[property], "属性值类型:", Object.prototype.toString.call(target[property]));



                console.log("[GET]", "对象:", objName, "属性名:", property, "属性类型:", Object.prototype.toString.call(property), "属性值类型:", Object.prototype.toString.call(target[property]));


                return Reflect.get(target, property);
            },
            set(target, property, value) {

                // console.log("[SET]", "对象:", objName, "属性名:", property, "属性类型:", Object.prototype.toString.call(property), "属性值:", value, "属性值类型:", Object.prototype.toString.call(value));

                console.log("[SET]", "对象:", objName, "属性名:", property, "属性类型:", Object.prototype.toString.call(property), "属性值类型:", Object.prototype.toString.call(value));

                return Reflect.set(...arguments);
            }
        };

        try {
            globalThis[objName] = new Proxy(global[objName], handler);
        } catch (e) {
            globalThis[objName] = new Proxy({}, handler); // 如果原对象不存在则创建空代理
        }
    });
}

// 代理关键浏览器对象
setProxy(['window', 'document', 'navigator', 'location']);